how to find the largest value in an array